<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	   	
	</head>
	<body>
		<form action="<?php echo U('add',array('gid'=>$_GET['gid'],'tid'=>$_GET['tid']))?>" method="post">
			<table class="table table-hover">
			<tr class="active">
			<th>货品ID</th>
			<?php foreach ($typedata as $k=>$v){?>
			<th><?php echo $v['ta_name']?></th>
			<?php }?>
		    <th>库存</th>
			<th>货号</th>
			 <th width="210">操作</th>
			</tr>
		<?php foreach ($olddata as $k=>$v){?>
			<tr>
			<td><?php echo $v['gl_id']?></td>
			<?php foreach ($v['gl_combine'] as $kk=>$vv){?>
			<td><?php echo $vv['ga_value']?></td>
			<?php }?>
				
			<td><?php echo $v['gl_inventory']?></td>
			<td><?php echo $v['gl_number']?></td>
			
			<td>
		<a href="<?php echo U('edit',array('glid'=>$v['gl_id'],'gid'=>$_GET['gid'],'tid'=>$_GET['tid']))?>" class="btn btn-sm btn-warning">编辑</a>
		<a href="<?php echo U('del',array('glid'=>$v['gl_id'],'gid'=>$_GET['gid'],'tid'=>$_GET['tid']))?>" class="btn btn-sm btn-danger">删除</a>
		</td>
			</tr>
			<?php }?>
	<tr>
		<td>添加货品</td>
		<?php foreach ($typedata as $k=>$v){?>
		<td>
		<select name="gl_combine[]"><option value="">--请选择--</option>
		<?php foreach ($v['select'] as $key=>$value){?>
			
			<option value="<?php echo $value['ga_id']?>"><?php echo $value['ga_value']?></option>
		<?php }?>
		</select>
		</td>
		<?php }?>
		<td><input type="text" value="" name="gl_inventory" placeholder="请输入库存"/></td>
		<td><input type="text" name="gl_number" value="" placeholder="请输入货号"/></td>
	 <td></td>
	</tr>
		</table>
		<input type="hidden" name="gl_gid" id="" value="<?php echo $_GET['gid']?>" />
		<input type="submit" value="确认添加" class="hd-btn hd-btn-success" style="height: 40px;"/>
		
		<style type="text/css">
			.page li{
				margin-right: 0;
			}
		</style>
		<center>
			<div class="page pagination">
				<ul>
					<?php echo $page?>
				</ul>
			</div>
		</center>
	</form></body>
</html>
